	<?php
	$html->css("/paid_listings/css/style.css",array(),null,false);
	$OrderModel = cri("PaidListings.Order");
?>
	<div class="plan_block" style="padding: 5px">
			<span class="title"><?php echo $html->link($listingTitle,'/admin/listings/view/'.$order['ListingPlan']['listing_id'])?></span>
		<br />	
		<div>
			<div class="unit size1of3">
				<span class="plan_property"><?php echo __("Order Id")?></span> <?php echo $order['Order']['id']?>
		<br />	
				<span class="plan_property"><?php echo __("Payment Status")?></span> <?php echo $OrderModel->showValue("status",$order['Order'],'Order');?>
				<br />
				<span class="plan_property"><?php echo __("Plan Status")?></span> <?php echo $order['ListingPlan']['status'] == ListingPlan::STATUS_INACTIVE ? __("Inactive") : __("Active")?>
				<?php if($order['ListingPlan']['plan_info']['Plan']['payment_type'] == Plan::PAYMENT_SUBSCRIPTION){?>
					<br />
					<span class="plan_property"><?php echo __("Subscription cycle period") ?><span class="plan_property"> <?php echo $order['ListingPlan']['plan_info']['Plan']['duration_number'].' '.$order['ListingPlan']['plan_info']['Plan']['duration_period']?>
			<?php } ?>
			</div>
			<div class="unit size1of3">
				<span class="plan_property"><?php echo __("Plan name")?></span> <?php echo $order['ListingPlan']['plan_info']['Plan']['title']?>
				<br />
				<span class="plan_property"><?php echo __("Plan price")?></span> <?php echo $order['Order']['currency_symbol'].$order['Order']['price'].'('.$order['Order']['currency'].')'?>
				<br />
				<span class="plan_property"><?php echo __("Total amount")?></span> <?php echo $order['Order']['currency_symbol'].$order['Order']['total_amount'].'('.$order['Order']['currency'].')'?>
				<br  />
				<!--<span class="plan_property"><?php echo __("Payment method")?></span><?php //echo $order['Order']['payment_handler']?>-->
			</div>
			<div class="unit size1of3">
                <?php if($order['Order']['start_date'] && $order['Order']['start_date'] != "0000-00-00"){?>
				<span class="plan_property"><?php echo __("Activation Date") ?> </span><?php echo $time->format('Y-m-d',$order['Order']['start_date'])?>
				<span class="clear"></span>
				<div class="clear"></div>
				<?php } ?>
                <?php if($order['ListingPlan']['status'] != ListingPlan::STATUS_INACTIVE){?>
                <span class="plan_property"><?php echo __("End Date")?></span>
				<?php echo $order['Order']['end_date'] ? $time->format('Y-m-d',$order['Order']['end_date']) : __("Never Expires") ?>
                <?php } ?>      
            </div>
		</div>
		<div class="actions">
				<?php echo $html->link(__("Edit"),array("action"=>"edit",$order['Order']['id']))?> 
				<?php //echo $html->link("Delete",array("action"=>"delete",$order['Order']['id']),array(),__("Are you sure you wan't to delete this order?"));?>
		</div>
	</div>
<?php if($order['Order']['admin_note']){?>
<br />
    <strong>
      <?php echo __("Your note:")?><br />
    </strong>
     <?php echo nl2br($order['Order']['admin_note'])?> 
<br />
<br />
<?php }?>
<?php //echo $html->link("Edit",array("action"=>"edit",$order['Order']['id']));?>
<br />
<div>
	<?php if(count($transactions)){?>
	<h3><?php echo __("Transactions")?></h3>
		<table>
			<tr>
				<th>
					<?php echo __("Transaction Id")?>
				</th>
				<th>
					<?php echo __("Status")?>
				</th>
				<th>
					<?php echo __("Created") ?>
				</th>
				<th>
					<?php echo __("Payment Method") ?>
				</th>
				<th>
					<?php echo __("Transaction Amount") ?>
				</th>
				<!--<th>
					<?php echo __("Other Information");?>
				</th>-->
			</tr>
			<?php foreach( $transactions as $transaction){ ?>
				<tr>
					<td>
						<?php echo $transaction['Transaction']['id'] ?>
					</td>
					<td>
						<?php echo $transaction['Transaction']['status'] == Transaction::SUCCESSFUL ? __("Successful") :  __("Failed")?>
					</td>
					<td>
						<?php echo $transaction['Transaction']['created']?>
					</td>
					<td>
						<?php echo $transaction['Transaction']['payment_handler']?>
					</td>
					<td>
						<?php echo $transaction['Transaction']['amount']?>
					</td>
					<!--<td>
						<textarea row="4" cols="20">
							<?php echo print_r($transaction['Transaction']['information'],true)?>
						</textarea>
					</td>-->
				</tr>
			<?php } ?>
		</table>
	<?php } ?>
</div>